Ext.namespace("Project.Main");

Project.Main = function(){
	
	var flag="";
		 //访问action
	 var conn = new Ext.data.Connection({
	    url:'../security/checkMenu.form?timesnap=' + Date.parse(new Date()),
	    method:'post'
	 })
	 var param={menuName:"hugl"};
	  //alert(Ext.util.JSON.encode(param));  
	 Utils.request(conn,{
	    params:param,
	    scope:this,
	    success:function(data){
	     if(data.access=="true"){
	     flag="true"	
	
	var mainPanel = new Ext.TabPanel( {
		activeTab : 0,
		width : 800,
		border : false,
		layoutOnTabChange:true,
		renderTo : 'main',
		items : [ {
			title : '用户管理',
			autoHeight : true,
			items : [ new User().createPanel ]
		}],
		listeners:{ 
      		activate:function(tab){ 
			} 
		}		
	});
	
 }else{
	      flag="false"
	      alert("没有权限");
	      return;
	     }
	
	    }
	  });	
};
	
	Ext.onReady(function(){
		 Ext.QuickTips.init();
		 Ext.form.Field.prototype.msgTarget = 'side';
		 Ext.BLANK_IMAGE_URL = '../resources/images/default/s.gif';
		 new Project.Main();
	});